package com.pajk.user;

/**
 * @author Haomin Liu
 */
public enum ExceptionCode {
    EntityNotFoundException("E0001-EntityNotFoundException"),
    InternalSystemErrorException("E0002-InternalSystemErrorException"),
    UniqueAccountPerChannelViolationException("E0003-UniqueAccountPerChannelViolationException"),
    UniqueKeyViolationException("E0004-UniqueKeyViolationException"),
    StaleDataException("E0005-StaleDataException");

    private String exceptionCode;

    ExceptionCode(String exceptionCode){
        this.exceptionCode = exceptionCode;
    }

    public String getCode(){
        return exceptionCode;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("exceptionName=\'").append(this.getClass().getSimpleName()).append("\'");
        sb.append("exceptionCode=\'").append(exceptionCode).append('\'');
        return sb.toString();
    }
}
